PC-DMIS 2019 R2 Object Library
Example Code from C++
See Also Send Topic Feedback | See Object Hierarchy Chart

Glossary Item Box

Description

Launching PC-DMIS Using C++

Source code

// Create my startup file

  int nIndex;

  CString szFileName, szLine(_T("/f"));

  GetModuleFileName (AfxGetInstanceHandle(), szFileName.GetBuffer (_MAX_PATH), _MAX_PATH);

  szFileName.ReleaseBuffer();

  nIndex = szFileName.ReverseFind('\\');

  szFileName = szFileName.Left(nIndex);

  szFileName += _T("\\AutomationStartupOptions.txt");

  CStdioFile StartupFile;

  if( StartupFile.Open(szFileName, CFile::modeCreate|CFile::modeWrite|CFile::typeText) )

  {

    StartupFile.WriteString(szLine);

    StartupFile.Close();

  }
Copyright © 2019. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.